from PyQt6.QtWidgets import QCheckBox

class MainAccountSelect:
    @staticmethod
    def on_checkbox_changed(table, row, state):
        """处理主账号选择"""
        # 取消其他行的选择
        for i in range(table.rowCount()):
            if i != row:
                checkbox = table.cellWidget(i, 0).findChild(QCheckBox)
                if checkbox:
                    checkbox.setChecked(False) 